package biz.noip.strategy.util;

import biz.noip.strategy.scenes.GameScene;

public class Coord {

	public static int getNumGridXByCoord(float pX) {
		return (int) pX / GameScene.TILE_WIDTH;
	}

	public static int getNumGridYByCoord(float pY) {
		return (int) pY / GameScene.TILE_HEIGHT;
	}

	public static float getCenterGridXByNumGrid(int pX) {
		return pX * GameScene.TILE_WIDTH + GameScene.TILE_WIDTH / 2;
	}

	public static float getCenterGridYByNumGrid(int pY) {
		return pY * GameScene.TILE_HEIGHT + GameScene.TILE_HEIGHT / 2;
	}
}
